<?php 
include 'function.php';
	$db=(include 'db.php');
	$del=(int)$_GET['id']-1;
	if ($del!==null) {
		unset($db[$del]);
		$db=array_values($db);
	$db=var_export($db,true);

$str=<<<aa
<?php
	return $db;
?>
aa;
	
	file_put_contents('db.php', $str);
	$_GET=null;
	success('删除成功','index.php');
		
	}else{
		error('删除失败');
	}
	
	


 ?>